<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .sliderbar {
            position: fixed;
            right: 0;
            bottom: 100px;
            width: 40px;
            height: 40px;
            text-align: center;
            line-height: 40px;
            cursor: pointer;
            color: #fff;
        }
        
        .con {
            position: absolute;
            left: 0;
            top: 0;
            width: 200px;
            height: 40px;
            background-color: purple;
            z-index: -1;
        }
    </style>
    <script src="js/animate.js"></script>
</head>
<body>
    <div class="sliderbar">
        <span>11</span>
        <div class="con">问题反馈</div>
    </div>
    <script>
        var sliderbar = document.querySelector('.sliderbar');
        var con = document.querySelector('.con');
        var span = document.querySelector('span');
        sliderbar.addEventListener('mouseover',function(){
            animate(con,-160,function(){
                con.style.backgroundColor = 'red';
                span.innerHTML = '22';
            })
        })
        sliderbar.addEventListener('mouseout',function(){
            animate(con,0,function(){
                con.style.backgroundColor = 'purple';
                span.innerHTML = '11';
            })
        })
    </script>
</body>
</html>